/****************************************************
          File Name:8-3.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sat 20 Dec 2014 07:11:56 PM CST
*****************************************************/

#include<iostream>
#include<string>
#include<cctype>
using namespace std;

void process(string & str)
{
// refer to stackoverflow.com/questions/735204/convert-a-string-in-c-to-upper-case
    for(auto & c: str)
    {
        cout << char(toupper(c));
    }
    cout << endl;
}

int main()
{
    string str;

    cout << "Enter a string (q to quit): ";
    getline(cin, str);
    while(str != "q")
    {
        process(str);
        cout << "Enter next string (q to quit)";
        getline(cin, str);
    }

    return 0;
}
